package config

import "github.com/go-redis/redis/v8"

type DAQCtlConfig struct {
	Partition     string `yaml:"partition"`
	RedisUrl      string `yaml:"redisUrl"`
	RedisPassword string `yaml:"redisPassword"`
	RedisDB       int    `yaml:"redisDB"`
	RosNumber     int    `yaml:"rosNumber"`
	BuilderNumber int    `yaml:"builderNumber"`
	PsNumber      int    `yaml:"psNumber"`
	EsNumber      int    `yaml:"esNumber"`
	DfmNumber     int    `yaml:"dfmNumber"`
	LogLevel      uint32 `yaml:"logLevel"`
}

var (
	DaqCtlConfig            DAQCtlConfig
	ConfigFile              string
	RedisChannel            string
	RedisCli                *redis.Client
	RedisAppStateKeyPattern = "edaq:%s.app:%s.state"
	RedisAppCmdKeyPattern   = "edaq:%s.app.control"
)
